package com.teddy.DTXMB.Service.Impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.teddy.DTXMB.Mapper.CategoryMapper;
import com.teddy.DTXMB.Model.Category;
import com.teddy.DTXMB.Service.CategoryService;

@Service
public class CategoryServiceImpl implements CategoryService{
	
	@Autowired 
	private CategoryMapper categoryMapper;
	
	
	@Override
	public Category getCategoryByID(int id) {
		return categoryMapper.getCategoryByID(id);
	}

	@Override
	public List<Category> getAllRootCategory() {
		return categoryMapper.getAllRootCategory();
	}

	@Override
	public Category getCategoryByName(String name) {
		return categoryMapper.getCategoryByName(name);
	}

}
